import gevent,threading,time

from gevent import monkey
import urllib.request


def fun1():
    for i in range(10):
        print("i",i)
        gevent.sleep(0.1)

def fun2():
    for j in range(10):
        print("j",j)
        gevent.sleep(0.1)

def show_thread():
    while True:
        print(threading.enumerate())
        time.sleep(0.5)


def downloader(img_name,img_url):
    req = urllib.request.urlopen(img_url)





if __name__ == '__main__':
    threading.Thread(target=show_thread).start()
    g1=gevent.spawn(fun1)
    g2=gevent.spawn(fun2)
    g1.join()
    g2.join()